<?php
/**
 * This file is part of Hyperf Mall.
 *
 * @link     https://gitee.com/scwlkj/hyperf_mall
 * @contact  hyperf_mall@163.com
 */

namespace App\Constants;

class AfterSaleConstants
{
    //售后状态
    const STATUS_NOT_AUDIT = 0; //待审核
    const STATUS_AUDIT_REJECT = 1; //已驳回
    const STATUS_STAY_DRAWBACK = 2;//已完成

    public static array $afterStatus = [
        self::STATUS_NOT_AUDIT => '待审核',
        self::STATUS_AUDIT_REJECT => '已驳回',
        self::STATUS_STAY_DRAWBACK => '同意并退款',
    ];

    //售后类型
    const STATUS_DRAWBACK = 1;//仅退款
    const STATUS_RETURN_GOODS = 2;//退货
    const STATUS_EXCHANGE_GOODS = 3;//换货

    public static $afterType = [
        self::STATUS_DRAWBACK => '退款',
        self::STATUS_RETURN_GOODS => '退货退款',
        self::STATUS_EXCHANGE_GOODS => '换货',
    ];

    // 订单是否整单售后
    const AFTER_ORDER_TYPE_ALL = 1; // 整单
    const AFTER_ORDER_TYPE_PART = 2; // 部分

    //退款状态
    const AFTER_BACK_YES = 1; // 退款成功
    const AFTER_BACK_NO = 0; //退款失败
    const AFTER_BACK_READY = 2; //退款中

    //是否售后
    const CUSTOMER_STATUS_NO = 0; // 不能售后
    const CUSTOMER_STATUS_YES = 1; //可以售后
    const CUSTOMER_STATUS_NULL = 2; //没有售后按钮

    //售后的次数
    const CUSTOMER_FREQUENCY = 3; //

    //售后日志
    const LOG_TYPE_USER = 0;            //用户
    const LOG_TYPE_PLATFORM = 1;        //平台
    const LOG_TYPE_SUPPLIER = 2;        //供应商
    const LOG_TYPE_SYSTEM = 3;          //系统

    //列表类型
    public static $afterListStatus = [
        self::LIST_TYPE_ALL => '',       //全部
        self::LIST_TYPE_AUDIT => 0,       //待审核
        self::LIST_TYPE_REJECT => 1,       //驳回
        self::LIST_TYPE_FINISH => 2,       //已完成
    ];

    const LIST_TYPE_ALL = '';        //全部
    const LIST_TYPE_AUDIT = 0;        //待审核
    const LIST_TYPE_REJECT = 1;        //驳回
    const LIST_TYPE_FINISH = 2;        //已完成

    //售后操作日志类型
    const  HANDLE_TYPE_APPLY = 0;  //申请
    const  HANDLE_TYPE_CANCEL = 1;  //取消
    const  HANDLE_TYPE_REJECT = 2;  //驳回
    const  HANDLE_TYPE_AUDIT = 3;  //通过并退款


    //退款类型
    const AFTER_MARKET_ALL = 1; // 全部
    const AFTER_MARKET_FREIGHT = 2; //运费
    const AFTER_MARKET_PART = 3; //部分
}

